package com.xncoding.pos.feign;

import com.xncoding.pos.common.model.ResultModel;
import com.xncoding.pos.config.feign.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * feign的远程调用
 *
 * @Author guoyb
 * @Date 2020/3/18  15:44
 */
@FeignClient(name = "resttemplate-server", url = "", fallback = MessFeignServiceFallBack.class, configuration = FeignConfig.class)
public interface MessFeignService {


    //使用拦截器,增加head里的参数:token
    @PostMapping("/jwt/verification")
    ResultModel verification();

    @GetMapping("/jwt/getUser")
    ResultModel getUser(@RequestParam String userId, @RequestParam Integer sleepSeconds);

}
